FROM java:8

MAINTAINER zsljava@studyjava.cn

# set environment
ENV BASE_DIR="/home/studyjava" \
    APP_NAME="docker-springboot" \
    TIME_ZONE="Asia/Shanghai" \
    CUSTOM_LOGGING_LEVEL_ROOT="info" \
    CUSTOM_LOGGING_PATH="/data/logs" \
    JAVA="java"
 
ARG VERSION=1.0

WORKDIR /$BASE_DIR  
    
RUN set -x \
    && ln -snf /usr/share/zoneinfo/$TIME_ZONE /etc/localtime && echo $TIME_ZONE > /etc/timezone
    
ADD ${APP_NAME}-${VERSION}.jar bin/${APP_NAME}.jar
ADD docker-startup.sh bin/docker-startup.sh

RUN chmod +x bin/docker-startup.sh

ENTRYPOINT ["bin/docker-startup.sh"]
